How to Query Whether or Not a Module is Displayed

If I open a module using the DXL function "read (moduleName, false)" then the module "moduleName" opens in read-only mode and the module is not displayed in a window (it is hidden).  If I go to the DOORS database explorer and select "Tools > Manage Open Modules ..." I can see all the open modules and can see that the module that I opened has "Displayed" == "false".

What is the DXL function that I can use to query whether the "Displayed" value of a module is "true" or "false" in the same manner that  "Tools > Manage Open Modules ..." returns true/false?


BeastBoysDad - Fri Jul 25 23:00:18 EDT 2014

Re: How to Query Whether or Not a Module is Displayed
PRM - Sat Jul 26 03:46:18 EDT 2014

You need to use the isVisible(m) boolean function. See code snippet below.

Module m
string moduleName = "/DOORS Training Project/Customer Documentation/COC"

m = read(moduleName, true)

if (isVisible(m)) print "Module is visible"

else print "Module is NOT visible"
 

Paul Miller
Melbourne, Australia

 

 

Re: How to Query Whether or Not a Module is Displayed
PRM - Sat Jul 26 03:54:40 EDT 2014

PRM - Sat Jul 26 03:46:18 EDT 2014

You need to use the isVisible(m) boolean function. See code snippet below.

Module m
string moduleName = "/DOORS Training Project/Customer Documentation/COC"

m = read(moduleName, true)

if (isVisible(m)) print "Module is visible"

else print "Module is NOT visible"
 

Paul Miller
Melbourne, Australia

 

 

The "Add Code" feature is ignoring my selection of DOORS as the format for displaying code, it defaults it to Java Script for some reason. Anyway, I have added the DOORS code snippet from my previous post below as text.

Module m
string moduleName = "<enter path and name of module>"
 
m = read(moduleName, true)
 
if (isVisible(m)) print "Module is visible"
 
else print "Module is NOT visible"

Paul Miller
Melbourne, Australia

Re: How to Query Whether or Not a Module is Displayed
BeastBoysDad - Mon Jul 28 12:35:29 EDT 2014

PRM - Sat Jul 26 03:54:40 EDT 2014

The "Add Code" feature is ignoring my selection of DOORS as the format for displaying code, it defaults it to Java Script for some reason. Anyway, I have added the DOORS code snippet from my previous post below as text.

Module m
string moduleName = "<enter path and name of module>"
 
m = read(moduleName, true)
 
if (isVisible(m)) print "Module is visible"
 
else print "Module is NOT visible"

Paul Miller
Melbourne, Australia

Great!  Thank you!